/*
 * A container class to carry around Scoring data for entries.  An array of
 * these form the object that is passed back to the SQL 'select' requests for
 * scores.  The GUI will need to handle formatting the data for useful results
 * depiction per the requirements.
 */

package carshow;

import java.io.Serializable;

/**
 *
 * @author Wayne Motycka
 */
class ScoreData implements Serializable {
    private static final long serialVersionUID = 1L;
    protected int entrant;
    protected String judge1;
    protected String judge2;
    protected int j1_1, j1_2, j1_3, j1_4, j1_5, j1_6;
    protected int j2_1, j2_2, j2_3, j2_4, j2_5, j2_6;

    public ScoreData(int entry, String j1_name, String j2_name,
            int j1_1, int j1_2, int j1_3, int j1_4, int j1_5, int j1_6,
            int j2_1, int j2_2, int j2_3, int j2_4, int j2_5, int j2_6) {
        this.entrant = entry;
        this.judge1 = j1_name;
        this.judge2 = j2_name;
        this.j1_1 = j1_1;
        this.j1_2 = j1_2;
        this.j1_3 = j1_3;
        this.j1_4 = j1_4;
        this.j1_5 = j1_5;
        this.j1_6 = j1_6;
        this.j2_1 = j2_1;
        this.j2_2 = j2_2;
        this.j2_3 = j2_3;
        this.j2_4 = j2_4;
        this.j2_5 = j2_5;
        this.j2_6 = j2_6;
    }
    public ScoreData(ScoreData sd) {
        this.entrant = sd.entrant;
        this.j1_1 = sd.j1_1;
        this.j1_2 = sd.j1_2;
        this.j1_3 = sd.j1_3;
        this.j1_4 = sd.j1_4;
        this.j1_5 = sd.j1_5;
        this.j1_6 = sd.j1_6;
        this.judge1 = new String(sd.judge1);
        this.j2_1 = sd.j2_1;
        this.j2_2 = sd.j2_2;
        this.j2_3 = sd.j2_3;
        this.j2_4 = sd.j2_4;
        this.j2_5 = sd.j2_5;
        this.j2_6 = sd.j2_6;
        this.judge2 = new String(sd.judge2);
    }

    public void setEntrant(int e) {
        entrant = e;
    }
    public void setJudge1(String j) {
        judge1 = j;
    }
    public void setJudge2(String j) {
        judge2 = j;
    }
    public void setJ1_1(int val) {
        j1_1 = val;
    }
    public void setJ1_2(int val) {
        j1_2 = val;
    }
    public void setJ1_3(int val) {
        j1_3 = val;
    }
    public void setJ1_4(int val) {
        j1_4 = val;
    }
    public void setJ1_5(int val) {
        j1_5 = val;
    }
    public void setJ1_6(int val) {
        j1_6 = val;
    }
    public void setJ2_1(int val) {
        j2_1 = val;
    }
    public void setJ2_2(int val) {
        j2_2 = val;
    }
    public void setJ2_3(int val) {
        j2_3 = val;
    }
    public void setJ2_4(int val) {
        j2_4 = val;
    }
    public void setJ2_5(int val) {
        j2_5 = val;
    }
    public void setJ2_6(int val) {
        j2_6 = val;
    }

    public ScoreData(int entry, String j1_name, int j1_1, int j1_2, int j1_3,
            int j1_4, int j1_5, int j1_6) {
        this.entrant = entry;
        this.judge1 = j1_name;
        this.j1_1 = j1_1;
        this.j1_2 = j1_2;
        this.j1_3 = j1_3;
        this.j1_4 = j1_4;
        this.j1_5 = j1_5;
        this.j1_6 = j1_6;
    }
    
    public void updateJudge2(String j2_name, int j2_1, int j2_2,
            int j2_3, int j2_4, int j2_5, int j2_6) {
        this.judge2 = j2_name;
        this.j2_1 = j2_1;
        this.j2_2 = j2_2;
        this.j2_3 = j2_3;
        this.j2_4 = j2_4;
        this.j2_5 = j2_5;
        this.j2_6 = j2_6;
    }
    
    @Override
    public ScoreData clone() {
        String nj1 = new String(judge1);
        String nj2 = new String(judge2);
        int nj1_1 = j1_1;
        int nj1_2 = j1_1;
        int nj1_3 = j1_1;
        int nj1_4 = j1_1;
        int nj1_5 = j1_1;
        int nj1_6 = j1_1;
        int nj2_1 = j1_1;
        int nj2_2 = j1_1;
        int nj2_3 = j1_1;
        int nj2_4 = j1_1;
        int nj2_5 = j1_1;
        int nj2_6 = j1_1;
        int nent = entrant;
        return new ScoreData(nent, nj1, nj2, nj1_1, nj1_2, nj1_3, nj1_4, nj1_5, 
            nj1_6, nj2_1, nj2_2, nj2_3, nj2_4,nj2_5, nj2_6);
    }
}
